<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <demo></demo>
        <async-comp></async-comp>
    </div>
</body>
<script src="../js/vue.js"></script>
<script>
    Vue.component("demo",{
        template:`
            <h1>同步组件</h1>
        `
    })
    Vue.component("async-comp",function(resolve,reject){
        setTimeout(function(){
            resolve({
                template:`
                    <h1>这是一个异步组件</h1>
                `
            })
        },3000)
    })
    let vm=new Vue({
        el:"#app",
    })
</script>
</html>